package main

import (
	"gopkg.in/ini.v1"
	"log"
	"quantization_trading/src/models"
	"quantization_trading/src/router"
	"quantization_trading/src/server"
	"quantization_trading/src/strategies"
)

func main() {
	// 读取配置文件
	conf, err := ini.Load("./src/config/my.ini")
	if err != nil {
		log.Fatal("配置文件读取失败, err = ", err)
	}
	// 初始化数据库
	db := models.InitDB(conf)
	defer db.Close()
	server.Init()
	strategies.Init()
	router.InitRouter(conf)
}
